﻿@{
    ViewBag.Title = "编辑";
    Layout = "../Shared/_Layout.cshtml";
}
@using mscook.mvc;
@model mscook.core.domain.LoginUser

<script type="text/javascript" src="@Url.Content("~/scripts/jquery.validate.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/jquery.validate.unobtrusive.js")"></script>
<script type="text/javascript" src="@Url.Content("~/scripts/jquery.unobtrusive-ajax.js")"></script>

<div class="row-fluid sortable">
    <div class="box span12">
        <div class="box-header well">
            <h2><i class="icon-edit"></i></h2>
            <div class="box-icon">
            </div>
        </div>
        <div class="box-content">
            @using (Html.BeginForm("edit", "systemUser", FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
            {
                <fieldset>
                    <legend>用户编辑</legend>
                    <input type="hidden" name="Id" value="@Model.Id" />
                    <div class="control-group">

                        <label class="control-label">用户名</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.LoginName, new { size = "16", @readonly = "true" })
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">真是姓名</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.Name, new { size = "16" })
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label">密码</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.Password, new { size = "16" })
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">邮箱</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.Email, new { size = "16", @readonly = "true" })
                            </div>
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">Vip</label>
                        <div class="controls">
                            <div class="input-prepend">
                                <input type="text" readonly="true" value="@Html.Encode(Model.IsVip ? "会员用户" : "普通用户")"/>
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label">会员到期时间</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.VipInvalidDate, new { size = "16", @class = "datepicker" })
                            </div>
                        </div>
                    </div>

                    <div class="control-group">
                        <label class="control-label">积分</label>
                        <div class="controls">
                            <div class="input-prepend">
                                @Html.TextBoxFor(loginUser => loginUser.Bonus, new { size = "16" })
                            </div>
                        </div>
                    </div>



                    <div class="form-actions">
                        <button type="submit" class="btn btn-primary btn-large">保存</button>
                        <button class="btn btn-large">Cancel</button>
                    </div>
                </fieldset>
            }
        </div>
    </div>
    <!--/span-->

</div>
